<?php 


/** 
***************************************************
*欢迎使用免费版xSite企业自助建站软件！
*这是一个专业为搜索引擎营销而设计的，极稳定、极易维护的建站软件！
*官方客服：help@php.net.cn
*官方下载网址：http://www.php.net.cn/xsite/ 
***************************************************
**/




if(!defined('IN_SITETEAM')) { exit('Access Denied'); } require_once SITE_ROOT . "/mod/common.inc.php"; $category = isset($GETS[0]) ? $GETS[0] : 0; if (!$category) { exit('必须设置分类ID'); } if (!array_key_exists($category, $system_category)) { exit('非法操作，当前分类不存在！'); } if ($category) { $nav_list = tpl_article_list("category={$category}&limit=5&status=3"); $nav_list = $nav_list['list']; } else { $nav_list = array(); } $CAT = $system_category[$category]; $page = intval(isset($GETS[1])?$GETS[1]:1); $category_list = cat_parent_category($category, $system_category); $category_list = array_reverse($category_list); $sub_category = cat_subcategory($category, $system_category); if (is_array($sub_category) && count($sub_category) == 0) { $category_id = $CAT['parent_category']; if ($category_id == '') $category_id = $category; $sub_category = cat_subcategory($category_id, $system_category); } $root_category_id = cat_root_category($category, $system_category); if ($root_category_id == '') { $root_category_id = $category; } $nav_place = array(); $nav_place[] = array("name" => '首页', "href" => "/"); if (is_array($category_list) && count($category_list)) { foreach ($category_list as $k => $v) { $nav_place[] = array("name" => $v['name'], "href" => $v['category_link']); } } $limit = (isset($tpl_article_list_limit) && $tpl_article_list_limit >= 2) ? ($tpl_article_list_limit) : 15; $list_desc = (isset($tpl_article_list_desc) && $tpl_article_list_desc == 1) ? 'DESC' : 'ASC'; $data = tpl_article_list("limit={$limit}&category={$category}&depth=1&page={$page}&sort={$list_desc}"); $list = $data['list']; $paging = $data['page']; $seo = array(); if (!empty($CAT['seo_title'])) { $seo['title'] = $CAT['seo_title']; } elseif (!empty($seo_title)) { $seo['title'] = "{$CAT['name']} - {$seo_title}"; } else { $seo['title'] = "{$CAT['name']} - {$site_title}";; } if (!empty($CAT['seo_keywords'])) { $seo['keywords'] = $CAT['seo_keywords']; } elseif (!empty($seo_keywords)) { $seo['keywords'] = "{$CAT['name']},{$seo_keywords}"; } else { $seo['keywords'] = "{$CAT['name']},{$site_keywords}";; } if (!empty($CAT['seo_description'])) { $seo['description'] = $CAT['seo_description']; } elseif (!empty($seo_description)) { $seo['description'] = "{$CAT['name']},{$seo_description}"; } else { $seo['description'] = "{$CAT['name']},{$site_description}";; } 